package cn.yun.web.servlet;

import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import java.io.IOException;
/*
GenericServlet抽象类:
  继承了Servlet接口,将Servlet接口中的其他抽象方法做了默认空实现,只把service()方法作为抽象方法
  将来定义Servlet类时,可以继承GenericServlet接口,实现service()方法即可

*/

@WebServlet(urlPatterns = "/demo2")
public class ServletDemo2 extends GenericServlet {

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("demo2...");
    }
}
